

#ifndef _NNET_LIST
#  define _NNET_LIST

#  include <config.h>
#  include <nnet_types.h>

/* Data structures */

typedef struct _nnet_llist_bucket {

  struct _nnet_llist *next;
  nnet_data data;

} nnlist_bucket;

typedef struct _nnlist {

  nnlist_bucket *start;
  nnet_size_t length;

} nnlist;

#  define NNLIST_TRAV(LIST, ELEM) ELEM = LIST->start;    \
  for ( ; ELEM != NULL; ELEM = ELEM->next)

/* Function decs */

nnlist     *nnet_list_new();
nnlist     *nnet_list_add(nnlist *, nnlist_bucket *);
nnlist     *nnet_list_del(nnlist *, int);
nnet_size_t nnet_list_len(nnlist *);

#endif
